package org.fastframework.test.Controller;

import org.fastframework.boot.annotation.Inject;
import org.fastframework.boot.web.annotation.Controller;
import org.fastframework.boot.web.annotation.RequestMapping;
import org.fastframework.test.Service.HelloService;
import org.fastframework.test.annotation.SysLog;
import org.fastframework.test.entity.User;

import java.util.Arrays;
import java.util.List;

@Controller
@RequestMapping("/hello")
public class HelloController {

    @Inject
    HelloService helloService;

    @RequestMapping("/getUser")
    public User getUser(String name) {
        return helloService.getUser(name);
    }

    @SysLog("获取列表")
    @RequestMapping("/list")
    public List<String> list() {
        return Arrays.asList("a", "b");
    }
}
